package com.gking.centerSystem.controller;


import com.gking.centerSystem.common.Result;
import com.gking.centerSystem.entity.ConfigSwitch;
import com.gking.centerSystem.entity.enums.ConfigSwitchCodeEnum;
import com.gking.centerSystem.service.ConfigSwitch.ConfigSwitchService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@Slf4j
@RestController
@RequestMapping("/configSwitch")
public class ConfigSwitchController {


    @Resource
    private ConfigSwitchService configSwitchService;


    //    @PostMapping("/setRegisterConfigStatus")
    public Result<String> setRegisterConfigStatus(@RequestBody ConfigSwitch configSwitch) {

        String code = configSwitch.getCode();
        Integer status = configSwitch.getStatus();
        String disableMsg = configSwitch.getDisableMsg();

        return configSwitchService.setConfigSwitchStatus(code, status, disableMsg);
    }


}
